package org.boulderfoodrescue.webapp.client.events;

import org.boulderfoodrescue.webapp.shared.UserAccount;

import com.google.gwt.event.shared.GwtEvent;

public class UserInfoUpdatedEvent extends GwtEvent<UserInfoUpdatedHandler>{
	private static final Type<UserInfoUpdatedHandler> TYPE = new Type<UserInfoUpdatedHandler>();
	private UserAccount userAccount;
	
  public UserInfoUpdatedEvent(UserAccount userAccount) {
  	this.userAccount = userAccount;
  }

  public static Type<UserInfoUpdatedHandler> getType() {
    return TYPE;
  }

  @Override
  public com.google.gwt.event.shared.GwtEvent.Type<UserInfoUpdatedHandler> getAssociatedType() {
    return TYPE;
  }
  
	@Override
  protected void dispatch(UserInfoUpdatedHandler handler) {
		handler.onUserUpdated(this);
  }

	public UserAccount getValue(){
		return userAccount;
	}
}
